Surface package changelogs on docs site#6636
Conversation
At startup the docs app now reaches up to the repo root and pulls in the towncrier-managed changelogs (repo-root CHANGELOG.md plus each packages/*/CHANGELOG.md), serving them through the regular docgen pipeline: - /changelog/ renders the main reflex changelog; each subpackage gets /changelog/<package>/. New package changelogs appear automatically. - The reflex-enterprise changelog is read from the installed distribution (via its dist RECORD) instead of a checked-in copy, so it can never go stale; the page appears once the published wheel ships a CHANGELOG.md. - Changelog markdown is normalized with a canonical H1 title, and the on-page TOC is limited to version headings. - Pages are listed in a Changelog section of the API Reference sidebar, included in llms.txt/llms-full.txt and .md asset serving, and the footer/navbar Changelog links now point at the new page instead of GitHub releases. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
Merging this PR will improve performance by 7.79%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_from_event_type[lambda_event] |
29.3 µs | 25.8 µs | +13.45% |
| ⚡ | test_from_event_type[event] |
29.4 µs | 26 µs | +13.09% |
| ⚡ | test_from_event_type[event_spec] |
52.3 µs | 48.9 µs | +6.82% |
| ⚡ | test_from_event_type[lambda_event_spec] |
54.3 µs | 51 µs | +6.36% |
| ⚡ | test_from_event_type[event_handler] |
94.9 µs | 91.3 µs | +3.89% |
| ⚡ | test_from_event_type[lambda_event_handler] |
95.4 µs | 92.1 µs | +3.59% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/lucid-hypatia-xq0xzi (42357a9) with main (251d0f5)
Footnotes
-
8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Greptile SummaryThis PR surfaces package changelogs on the docs site at
Confidence Score: 5/5Safe to merge; the change adds read-only changelog rendering with no mutations to app state or data. All new code follows established patterns in the codebase, edge cases (missing files, stale distribution records, empty sources) are handled, and the test suite covers both unit and integration paths including route validation. The removal of the TYPE_CHECKING-gated import in test_app.py is safe because that file has from future import annotations. No files require special attention. Important Files Changed
Reviews (7): Last reviewed commit: "remove useless TYPE_CHECKING import of A..." | Re-trigger Greptile |
A wheel can vendor third-party changelogs deeper in its tree (e.g. bundled frontend assets); picking the first RECORD match could surface the wrong file. Sort candidates by path depth so the package-level changelog wins. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
The 0.9.0.post1 wheel ships reflex_enterprise/CHANGELOG.md, so the docs site now renders the enterprise changelog at /changelog/reflex-enterprise/. Exempt reflex-enterprise from the exclude-newer cutoff like the other internal lockstep packages. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
reflex-enterprise 0.9.0 restricts `reflex run --env prod` to paid tiers, which broke the reflex-docs integration jobs after the version bump. The gate explicitly exempts reflex's own integration tests via the app harness flag, so set it for every job that boots the docs app in prod. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
wrapt 2.2 adds generic typing to ObjectProxy and needs some code change to pass pyright
these upgrades introduced pre-commit issues, will upgrade separately and mitigate the changes in code
There was a problem hiding this comment.
Pull request overview
Adds first-class changelog discovery and rendering to the Reflex docs site so users can browse package changelogs under /docs/changelog/ instead of GitHub releases, including support for monorepo Towncrier changelogs and (optionally) an installed reflex-enterprise distribution changelog.
Changes:
- Introduces
reflex_docs/changelogs.pyfor changelog discovery, ordering, and H1 normalization. - Registers discovered changelogs as virtual docs under
docs/changelog/, renders them with a constrained TOC, and exposes them via sidebar + footer updates. - Adds/updates tests and CI config to validate changelog routing and ensure integration workflows run with the required harness flag.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/units/test_app.py | Removes redundant TYPE_CHECKING import block for AuthProvider. |
| pyproject.toml | Adjusts dependency constraint for wrapt; exempts reflex-enterprise from uv’s exclude-newer floor window. |
| packages/reflex-site-shared/src/reflex_site_shared/constants.py | Updates the canonical changelog URL to the docs site route. |
| docs/app/tests/test_routes.py | Adds a route-level assertion ensuring all discovered changelogs are served under /changelog/. |
| docs/app/tests/test_changelogs.py | Adds unit tests for changelog discovery (repo + distribution), ordering, and normalization. |
| docs/app/tests/test_agent_files.py | Adds regression coverage for section naming on root-level markdown docs. |
| docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py | Adds a “Changelog” sidebar section and treats changelog routes as API-reference-styled content. |
| docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/reference.py | Generates sidebar items for changelogs based on discovered packages. |
| docs/app/reflex_docs/templates/docpage/docpage.py | Updates footer “Changelog” link to point to /changelog/. |
| docs/app/reflex_docs/pages/docs/init.py | Registers changelog virtual docs and adds a specialized handler for changelog rendering/TOC shaping. |
| docs/app/reflex_docs/docgen_pipeline.py | Adds render_markdown_with_toc() helper for rendering plus heading extraction. |
| docs/app/reflex_docs/changelogs.py | New module implementing changelog discovery + normalization logic. |
| docs/app/pyproject.toml | Pins reflex-enterprise to a minimum version for docs app builds. |
| docs/app/agent_files/_plugin.py | Ensures llms.txt section naming strips .md for root-level docs (e.g. changelog.md). |
| CONTRIBUTING.md | Documents where changelogs are published and how the docs site sources them. |
| .github/workflows/integration_tests.yml | Sets APP_HARNESS_FLAG to allow integration tests to run in prod mode when enterprise restrictions apply. |
| .github/workflows/check_outdated_dependencies.yml | Sets APP_HARNESS_FLAG for dependency-check workflow parity with CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Type of change
Description
This PR adds changelog discovery and rendering to the docs site, making package changelogs accessible at
/docs/changelog/instead of requiring users to visit GitHub releases.What changed:
New
reflex_docs/changelogs.pymodule — Discovers and normalizes changelogs:discover_repo_changelogs()finds towncrier-managed changelogs in the monorepo (repo root +packages/*/CHANGELOG.md)find_distribution_changelog()locates changelogs shipped with installed distributions (e.g.,reflex-enterprise)discover_changelogs()combines both sources, orderingreflexfirst then alphabeticallynormalize_changelog()ensures consistent H1 headings across different changelog formats (towncrier vs. Keep-a-Changelog)Changelog rendering in docs — Integrated into the docs pipeline:
handle_changelog_doc()handler normalizes changelog markdown and limits TOC to version headings (H2 and above)docs/changelog/with the mainreflexchangelog at the section index/changelog/instead of GitHub releasesSidebar navigation — Added changelog section to the docs sidebar:
get_sidebar_items_changelog()dynamically generates sidebar items from discovered packagesHelper function — Added
render_markdown_with_toc()to extract heading structure while rendering markdownDocumentation — Updated
CONTRIBUTING.mdto explain where changelogs are publishedTests
docs/app/tests/test_changelogs.pycovering:test_routes.pyto ensure all discovered changelogs are servedtest_agent_files.pyfor root-level markdown docsAll tests pass with the changes.
Related issues
Closes the need for users to navigate to GitHub releases for changelog information.
https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7